#ifndef IMAGE_H
#define IMAGE_H

#include <stdint.h>

#define IMAGE_CONTEXT_OFFSET 256

#ifdef __cplusplus
extern "C" {
#endif

typedef struct ImageHeader {
    uint8_t magic_number[4];    /* Magic number, fixed value as 'I','M','G',0, Used to identify image file. */
    uint8_t version[4];         /* Image version, format as A.B.C.D. */
    uint32_t option;            /* Option bits. */
    uint32_t ivt_offset;        /* offset of interrupt vector table. */
    uint32_t length;            /* Length of image file include image header. */
    uint16_t crc16;             /* CRC-16 of image content. not contains image header. */
    uint16_t reserved;          /* Reserved */
}__attribute__((packed)) ImageHeader_t;

#ifdef __cplusplus
}
#endif

#endif
